package cn.iocoder.yudao.module.vos.controller.admin.tenantrequestlog.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;
import cn.idev.excel.annotation.*;
import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;

@Schema(description = "管理后台 - 租户请求日志 Response VO")
@Data
@ExcelIgnoreUnannotated
public class TenantRequestLogRespVO {

    @Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11614")
    @ExcelProperty("ID")
    private Long id;

    @Schema(description = "租户ID", example = "31858")
    @ExcelProperty("租户ID")
    private Long rechargeTenantId;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "请求URL", example = "https://www.iocoder.cn")
    @ExcelProperty("请求URL")
    private String url;

    @Schema(description = "请求参数")
    @ExcelProperty("请求参数")
    private String params;

    @Schema(description = "请求返回")
    @ExcelProperty("请求返回")
    private String respons;

    @Schema(description = "请求类型", example = "2")
    @ExcelProperty(value = "请求类型", converter = DictConvert.class)
    @DictFormat("request_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String requestType;

    @Schema(description = "单价(元)", requiredMode = Schema.RequiredMode.REQUIRED, example = "15984")
    @ExcelProperty("单价(元)")
    private BigDecimal unitPrice;

    @Schema(description = "请求后的余额(元)", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("请求后的余额(元)")
    private BigDecimal afterBalance;
    /**
     * 请求编号
     */
    @Schema(description = "请求编号", example = "20230810101010101010101010101010")
    @ExcelProperty("请求编号")
    private String requestNumber;
    /**
     * 客户端IP
     */
    @Schema(description = "客户端IP", example = "127.0.0.1")
    @ExcelProperty("客户端IP")
    private String requestIp;
    /**
     * 密钥ID
     */
    @Schema(description = "密钥ID", example = "1024")
    @ExcelProperty("密钥ID")
    private Long secretId;

}
